home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970326-19970626 / 000145_news@newsmaster….columbia.edu _Tue Apr 29 20:07:08 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id UAA26996
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 29 Apr 1997 20:07:07 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id UAA23051
  7.     for kermit.misc@watsun; Tue, 29 Apr 1997 20:07:07 -0400 (EDT)
  8. From: arthur@gateway.dircsa.org.au (Arthur Marsh)
  9. Newsgroups: comp.protocols.kermit.misc
  10. Subject: Re: Need help capturing text output
  11. Date: 30 Apr 1997 01:34:45 +0930
  12. Organization: DIRC - Disability Information & Resource Centre - Sth Australia
  13. Lines: 95
  14. Message-ID: <5k566t$moj@gateway.dircsa.org.au>
  15. References: <3365C5DB.373053CB@salug.org.au>
  16. NNTP-Posting-Host: apache.dircsa.org.au
  17. X-Newsreader: TIN [version 1.1 PL8]
  18. Path: news.columbia.edu!panix!news.mathworks.com!cam-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!pacbell.com!ihnp4.ucsd.edu!munnari.OZ.AU!harbinger.cc.monash.edu.au!ns.saard.net!news.camtech.net.au!news.dircsa.org.au!news.dircsa.org.au!not-for-mail
  19. Xref: news.columbia.edu comp.protocols.kermit.misc:6965
  20.  
  21. Chris Foote (chris@salug.org.au) wrote:
  22. : Hello everyone.
  23.  
  24. : I am attempting to get output from a UV meter using Kermit.  This UV
  25. : Meter is connected via serial cable to a modem, and I have a Linux
  26. : box runing Kermit attached to a modem which dials into the UV meter's
  27. : modem.
  28.  
  29. : I can successfully execute commands on the UV meter in 'CONNECT' mode,
  30. : and my script is almost working - but I don't know how to capture the
  31. : output to a file.
  32.  
  33. : It seems that the 'log xxx' functions weren't designed for this 
  34. : purpose - although I could be wrong :-)
  35.  
  36. : I'm a Kermit newbie, so any help would be most appreciated.
  37.  
  38. I do some logging by the following method:
  39.  
  40. #!/bin/sh
  41. ps -ef|grep kermit|grep chat
  42. if [ $? -ne 0 ]
  43. then
  44. /home/arthur/chatlog.sh|/opt/bin/kermit -y /home/arthur/chatlog.ini >> /home/arthur/Mail/chat.log
  45. fi
  46.  
  47. chatlog.sh looks like:
  48.  
  49. #!/bin/sh
  50. while true 
  51. do 
  52.     sleep 120
  53.     echo \*\*\* Chat Logging is in effect \*\*\* \\n\\r
  54.     sleep 1
  55.     echo /data\\n\\r
  56.     sleep 419
  57. done
  58.  
  59. You could instead have a shell script that just sleeps for the period you
  60. want logging done, and when the shell script terminates, so does kermit.
  61.  
  62. chatlog.ini does the following:
  63.  
  64. NOPUSH
  65. ;LOG SESSION /home/arthur/Mail/chat.log APPEND
  66. SET CARRIER ON 1
  67. SET COMMAND BYTESIZE 8
  68. SET EXIT WARNING OFF
  69. SET QUIET ON
  70. SET TERMINAL AUTODOWNLOAD OFF
  71. SET TERMINAL BYTESIZE 8
  72. SET TERMINAL CHARACTER-SET TRANSPARENT
  73. SET TERMINAL ESCAPE DISABLED
  74. SET TERMINAL APC OFF
  75. SET PARITY NONE
  76. set line /dev/tty6
  77. if fail goto endker
  78. SET SPEED 19200
  79. SET FLOW RTS/CTS
  80. pause 1
  81. output \13
  82. pause 5
  83. output Chat Log\13
  84. pause 5
  85. output cglog\13
  86. pause 5
  87. output \32
  88. pause 5
  89. output \32
  90. pause 5
  91. output \32
  92. pause 5 
  93. output \32
  94. pause 5
  95. output C
  96. pause 5
  97. output \32
  98. pause 5
  99. output O
  100. pause 5
  101. output \32
  102. pause 5
  103. CONNECT
  104. :endker
  105. echo disconnecting...
  106. quit
  107.  
  108.  
  109. : Chris Foote
  110. : South Australian Linux Users Group
  111. : chris@salug.org.au
  112. -- 
  113. Arthur Marsh, telephone +61-8-8370-2365, fax +61-8-8223-5082 
  114.               arthur@dircsa.org.au
  115. .endofsig